package com.zh.file.controller;

import com.zh.file.service.HelloService;
import com.zh.file.service.TestTransactional2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @ClassName HelloController
 * @date: 2020.12.10 19:53
 * @Author: zhanghang
 */
@RestController
@RequestMapping("/user")
public class HelloController {


    @Autowired
    private HelloService helloService1;
    @GetMapping("/gethello")
    public String hello(){
        return helloService1.hello();
    }

    @GetMapping("/msg")
    public String msg(){
        helloService1.msg();
        return "ok";
    }
}
